<?php if (!defined('THINK_PATH')) exit();?><div class="modal-dialog">
	<div class="modal-content">
		<div class="modal-header">
			<button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
			<h4 class="modal-title" id="myModalLabel"><b>员工列表</b></h4><span class="unshift-user">温馨提示:姓名标红为未排班人员</span><span></span>
		</div>
		<div class="modal-body form-horizontal">
		<?php if(empty($user)): ?><div>---暂无数据---</div>
		<?php else: ?>
			<form name="form1" action="<?php echo U('hrm/workingshift/shiftwork');?>" method="post">
				<input type="hidden" name="working_shift_id" value="<?php echo ($working_shift_id); ?>"/>
				<table class="table table-striped">
					<thead>
						<tr>
							<th><input type="checkbox" name="check_all" class="check_all"></th>
							<th width="14%">姓名</th>
							<th width="20%">班次</th>
							<th width="26%">部门-岗位</th>
							<th>电话</th>
							<th>邮箱</th>
						</tr>
					</thead>
					<tbody>
						<?php if(is_array($user)): $i = 0; $__LIST__ = $user;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): $mod = ($i % 2 );++$i;?><tr>
								<td><input type="checkbox" name="user_id[]" value="<?php echo ($vo["user_id"]); ?>" <?php if($working_shift_id == $vo['working_shift_id']): ?>checked="checked"<?php endif; ?> /></td>
								<td>
									<?php if('0' == $vo['working_shift_id']): ?><span class="color-red"><?php echo ($vo["name"]); ?></span><?php else: echo ($vo["name"]); endif; ?>
								</td>
								<td><?php echo ($vo["working_shift_name"]); ?></td>
								<td><?php echo ($vo["department_name"]); ?>-<?php echo ($vo["position_name"]); ?></td>
								<td><?php echo ($vo["telephone"]); ?></td>
								<td><?php echo ($vo["email"]); ?></td>
							</tr><?php endforeach; endif; else: echo "" ;endif; ?>
					</tbody>
				</table>
				<div class="modal-footer">
					<input type="submit" class="btn btn-primary" value="确定" />
					<button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
				</div>
			</form><?php endif; ?>
		</div>
	</div>
</div>
<script type="text/javascript">
	/**
	 * 全选
	 *
	 **/
	$(function(){
		$(".check_all").click(function(){
			$("input[name='user_id[]']").prop('checked', $(this).prop("checked"));
		});
	});
	
</script>